<template>
		<van-nav-bar :fixed="true" :title="title" :left-arrow="!isBar" :safe-area-inset-top="true" @click-left="onClickLeft" />
</template>

<script setup>
import { reactive, toRefs, onMounted, computed, getCurrentInstance, watch, defineEmits, ref } from 'vue';
const { proxy } = getCurrentInstance();
// 声明props
const props = defineProps({
	isBar: {
		type: Boolean,
		default: true,
	},
});
const data = reactive({
	title: computed(() => {
		return proxy.$route.meta.title;
	}),
});
const { title } = toRefs(data);
const onClickLeft = () => {
	history.go(-1)
};
</script>

<style lang="scss">
 .van-nav-bar{
	max-width: 768PX !important;
	left: 50% !important;
	transform: translateX(-50%);
}
.van-nav-bar__text {
	margin-top: 2px;
}
.van-ellipsis {
	margin-top: 2px;
}
</style>
